
// 1.0 导入sql.js模块获得execSql方法
const execSql = require('./sql');

// execSql('select * from student', (result) => {
//     console.log(result);
// })

// execSql('select id,username from student', (result) => {
//     console.info(result);
// })

const fs = require('fs');

execSql('select * from student', (result) => {
    fs.writeFileSync('./data.json', JSON.stringify(result), 'utf8');
    console.log('写入成功');
})